package com.kaili.zuul.security;

import com.kaili.common.util.Calendar;
import org.springframework.context.annotation.Configuration;
import org.springframework.security.authentication.AuthenticationDetailsSource;
import org.springframework.security.web.authentication.WebAuthenticationDetails;

import javax.servlet.http.HttpServletRequest;

/**
 * Created by rzh on 18-5-4.
 */
@Configuration
public class DetailsSource implements AuthenticationDetailsSource<HttpServletRequest,WebAuthenticationDetails> {
    @Override
    public WebAuthenticationDetails buildDetails(HttpServletRequest httpServletRequest) {
        return new Calendar(httpServletRequest);
    }
}
